{% extends "base.html" %}

{% block title %}电影场次列表{% endblock %}

{% block content %}
<div class="card animate-fade">
    <div class="card-header">
        <h2 class="mb-0"><i class="bi bi-film me-2"></i>电影场次列表</h2>
    </div>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th scope="col">电影名称</th>
                        <th scope="col">影院</th>
                        <th scope="col">放映时间</th>
                        <th scope="col">影厅</th>
                        <th scope="col">价格</th>
                        <th scope="col">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {% for show in shows %}
                    <tr>
                        <td>{{ show.movie_title }}</td>
                        <td>{{ show.cinema_name }}</td>
                        <td>{{ show.start_time.strftime('%Y-%m-%d %H:%M') }}</td>
                        <td>{{ show.hall }}</td>
                        <td>{{ show.price }}元</td>
                        <td>
                            <a href="{{ url_for('booking', show_id=show.id) }}" class="btn btn-sm btn-primary">
                                选座购票
                            </a>
                        </td>
                    </tr>
                    {% else %}
                    <tr>
                        <td colspan="6" class="text-center">暂无场次信息</td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock %}